package com.googlecode.java_cl_parser;

import com.googlecode.java_cl_parser.support.ArgTool;
import junit.framework.Assert;
import org.junit.Test;

public class ArgTypes
{
	@Test
	public void argSupplied() throws Exception
	{
		ArgTool basicTest = new ArgTool(true, true, true);
		CommonsCLILauncher.mainWithInstance(basicTest, new String[]{"-tc", "-flag1", "-flag2"});
		Assert.assertTrue("Flags don't match expected state: " + basicTest.state(), basicTest.isSet());
	}

	@Test
	public void argNotSupplied() throws Exception
	{
		ArgTool basicTest = new ArgTool(true, false, false);
		CommonsCLILauncher.mainWithInstance(basicTest, new String[]{});
		Assert.assertTrue("Flags don't match expected state: " + basicTest.state(), basicTest.isSet());
	}
}